[mirrors]
http://matt.ucc.asn.au/dropbear/releases/dropbear-2015.68.tar.bz2

[vars]
filesize=1611161
sha512=7725cd4077a3968684db3646f6013c6202977e79d281619e029366e45fca9c4e33e271812626237b6e33938eeb4c8b260902fe2b57cff085086bf930713a934a
desc="lightweight ssh server/client"

[deps]
zlib
sshd-service

[build]
[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"
CPPFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE" \
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

# TODO : edit generated options.h

for i in UTMP WTMP PUTUTLINE PUTUTXLINE SYSLOG LASTLOG ; do
	echo "#define DISABLE_$i" >> config.h
done

make SCPPROGRESS=1 PROGRAMS="dropbear scp dbclient dropbearkey dropbearconvert" \
  prefix="$butch_prefix" sbindir="$butch_prefix"/bin DESTDIR="$butch_install_dir" \
  -j$MAKE_THREADS STATIC=1

make SCPPROGRESS=1 PROGRAMS="dropbear scp dbclient dropbearkey dropbearconvert" \
  prefix="$butch_prefix" sbindir="$butch_prefix"/bin DESTDIR="$butch_install_dir" \
  -j$MAKE_THREADS install STATIC=1

[ -e "$butch_prefix"/ssh ] || ln -s dbclient "$butch_install_dir""$butch_prefix"/bin/ssh

IS="$K"/bin/install-service
"$IS" --down --log --force dropbear "$K"/services/dropbear
